package com.zqc.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;

@Data
public class SysMenu {

    private long id;
    @NotNull(message = "上级菜单不能为空")
    private long parentId;
    @NotBlank(message = "菜单名称不能为空")
    private String name;
    @TableField(value = "menuPath")
    private String menuPath;
    @NotBlank(message = "权限编码不能为空")
    private String perms;
    private String component;
    @NotNull(message = "类型不能为空")
    private Integer type;
    private String icon;
    @TableField(value = "orderNum")
    private long orderNum;
    private java.sql.Timestamp created;
    private java.sql.Timestamp updated;
    @NotNull(message = "菜单状态不能为空")
    private long status;

    @TableField(exist = false)
    private List<SysMenu> children = new ArrayList<>();

}
